<template>
  <view class="form1">
    <base-form v-model="formModel" :labelWidth="100" :formList="formList" :btnMessage="btnMessage" @submit="submit" v-show="isShow">
    </base-form>
  </view>
</template>

<script>
import {addHotWorkTicketAPI} from '../../../../api/api.js'
import {
  workHeaderAPI,
  auditorsAPI
} from '@/api/public.js'
export default {
  props:['form','pageTyep'],
  data() {
    return {
      isShow:true,
      fileUrl:'',
      btnMessage: {
        state: false,
        cancels: '上一步',
        submit: '申请',
      },
      formModel: {
        name: "",
        userPicker: "",
        datetime: "",
        picker: "",
      },
      formList: []
    }
  },
  created(){
    this.getHeader()
    console.log(9999888,this.form)
  },
  methods: {
    getHeader(){
      auditorsAPI({type:this.pageTyep}).then((r)=>{
        if(r.code === 200){
          let msg = r.data.map((e)=>{
            return { type: "userPicker", label:e.ryms, mode:e.remark,show: false,borderBottom: true, placeholder: e.ryms}
          })
          this.formList = msg
        }
      })
    },
    submit() {
      addHotWorkTicketAPI({}).then((r)=>{
        console.log(r)
      })
    },
  }
}
</script>

<style lang="scss" scoped>
.form1 {
  background: #FFF;

  .signature {
    font-size: 24rpx;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 60rpx;
    width: 180rpx;
    height: 180rpx;
    background: #F6F6F6;
  }
}
</style>
